package entity.sparemanage.vo;
import entity.sparemanage.Warehousing;
import entity.sparemanage.dto.selByPartsIdDto;

public class SelOneCollectionVo {
    public selOneCollectingVo SelOneCollection(Warehousing warehousing, wareVo wareVo, PeopleVo peopleVo,selByPartsIdDto selByPartsIdDto,PeopleVo peopleVos){
        selOneCollectingVo selOneCollectingVo = new selOneCollectingVo();
        selOneCollectingVo.setWareType(warehousing.getWareType().toString());
        selOneCollectingVo.setWareName(warehousing.getWareName());
        if (selByPartsIdDto!=null){
            selOneCollectingVo.setPurchaseOrder(selByPartsIdDto.getProcureCode());
            selOneCollectingVo.setPurchasePerson(selByPartsIdDto.getPeopleVo().getPeopleManagementName());
            selOneCollectingVo.setContacts(selByPartsIdDto.getPeopleVo().getCellPhone());
            selOneCollectingVo.setSupplier(selByPartsIdDto.getSupplierManagement().getSupplierName());
            selOneCollectingVo.setContact(selByPartsIdDto.getSupplierManagement().getContactWay());
        }
        selOneCollectingVo.setApplyPerson(peopleVos.getPeopleManagementName());
        selOneCollectingVo.setDepartmentName(peopleVos.getDepartmentName());
        selOneCollectingVo.setStorageNumber(warehousing.getWareCode());
        selOneCollectingVo.setStorageDate(warehousing.getWareTime());
        selOneCollectingVo.setWarehouseName(wareVo.getWarehouseName());
        selOneCollectingVo.setWarehouseAdmin(wareVo.getPeopleName());
        selOneCollectingVo.setReturnReason(warehousing.getReturnReason());
        selOneCollectingVo.setStoragePerson(peopleVo.getPeopleManagementName());
        selOneCollectingVo.setRemark(warehousing.getWareRemark());
        return selOneCollectingVo;
    }
}
